package ar.edu.taxi.util;

import java.io.File;
import java.io.FileInputStream;
import java.util.Properties;

public class DBConfig {
	Properties p = null;
	
	private String host;
	private String dataBase;
	private String user;
	private String pass;
	
	
	public DBConfig(String file) {
		try{
			p = new Properties();
			
			p.load(new FileInputStream(new File(file) ));
			
			this.host = p.getProperty("host");
			this.dataBase = p.getProperty("database");
			this.user = p.getProperty("user");
			this.pass = p.getProperty("pass");
			
		}catch (Exception e) {
			e.printStackTrace();
		}
	}


	public Properties getP() {
		return p;
	}


	public String getHost() {
		return host;
	}


	public String getDataBase() {
		return dataBase;
	}


	public String getUser() {
		return user;
	}


	public String getPass() {
		return pass;
	}
}
